package mc.support.taobao.api;

import com.taobao.api.TaobaoRequest;
import com.taobao.api.request.DeliveryTemplatesGetRequest;
import com.taobao.api.response.DeliveryTemplatesGetResponse;
import mc.support.taobao.api.fields.GetDeliveryTemplatesFields;

/**
 * Created with IntelliJ IDEA. <br/>
 * Author: wangming    <br/>
 * Date: 2014-11-21  <br/>
 */
public class GetDeliveryTemplatesReq extends AbstractReq<GetDeliveryTemplatesReq, DeliveryTemplatesGetResponse> {

    private GetDeliveryTemplatesFields fields;

    @Override
    protected TaobaoRequest toRequest() {
        DeliveryTemplatesGetRequest req = new DeliveryTemplatesGetRequest();
        if ( null != fields ) {
            req.setFields( fields.toString() );
        }
        return req;
    }

    public GetDeliveryTemplatesReq fields( GetDeliveryTemplatesFields fields ) {
        this.fields = fields;
        return this;
    }

}
